﻿
function wObj(obj){ 
 var description = ""; 
 for(var i in obj){ 
  var property=obj[i];
  description+=i+" = "+property+"\n"; 
 }
 alert(description);
};
function showAlert(text) {
    var call = false;
    var type = 'error';
    if (arguments.length > 1) {
        call = arguments[2];
        type = arguments[1] || type;
    }
    if (!call) $.messager.alert('Warning', text);
    else $.messager.alert('Warning', text, type, call);
}
function showWarning(text) {
    showAlert(text, 'warning',
    function() {});
}
function showInfo(text) {
    var call = false;
    if (arguments.length > 1) {
        call = arguments[1];
    }
    if (!call) $.messager.alert('Info',text, 'info');
    else $.messager.alert('Info', text, 'info', call);
}
function showError(text) {
    var call = false;
    if (arguments.length > 1) {
        call = arguments[1];
    }
    if (!call) $.messager.alert('Error', text, 'error');
    else $.messager.alert('Error', text, 'error', call);
}
function showConfirm(text, f) {
    $.messager.confirm('Confirm', text, f);
}
function showOk() {
    $.messager.show({
        'title': 'Ok',
        'msg': 'Your request submitted successfully.',
        'showType': 'fade',
        'timeout': 1000
    });
}
